struct BStree{
  int data;
  int bf;
  struct BStree * l;
  struct BStree * r;
};
/*@ let  tree(t) = t==null ||
  	({{t}}&&tree(t->l)&&tree(t->l))
    in tree(t)&& p->r!=null
    end
*/
struct BStree *  L_Rotate(struct BStree * p)
{
	struct BStree *rc,q;
	q=p;
	rc=q->r;
	q->r=rc->l;
	rc->l=q;
	q=rc;
	return q;
}
/*@ {{result->l,p},{result},{result->l->r}}&& tree(result->l->l)&& 
tree(result->l->r->r)&& tree(result->l->r->l) && tree(result->r)*/